# 
# The Submarine Technology Group
#
#
#	
#	

technology = {
	id = 5
	category = submarine
	name = TECH_SUB_NAME #Localized name
	desc = TECH_SUB_DESC #Localized description
	
	level = { # Basic Submarine Technology
		id = 5000
		name = "Basic Submarine Technology"
		desc = "The first successful submarine attack occurred during the American civil war when the Confederate submersible Hunley sank the Federal frigate Houstatonic.  This proved that submarines could be effective for coastal defense.  A truly effective submarine design would have to wait until John Holland launched his first submarine in 1897."
		
		cost = 4
		time = 360
		neg_offset = 45
		pos_offset = 90
		
		application = { 
			id = 5006
			name = "Standardized Submarine Construction"
			desc = "The first submarines were all unique designs.  These submarines served as prototypes to determine what desirable characteristic in design were.  Once these characteristics had been determined, standardized designs could be produced in greater numbers for use with the fleet."
			
			required = { 6014 6025 13010 }
			chance = 90
			cost = 2
			time = 180
			neg_offset = 20
			pos_offset = 40
			
			effects = {
				command = { }
			}
		}
		application = { 
			id = 5007
			name = "Submarine Support Infrastructure"
			desc = "The training of crews to man the submarines takes special schools.  You can't just take a man off a surface warship and expect him to be a submariner.  The establishment of training schools for the volunteers and the provision for trained personnel ashore to maintain the submarines is necessary before deployment of submarines can begin."
			
			required = { 6021 }
			chance = 90
			cost = 2
			time = 180
			neg_offset = 20
			pos_offset = 40
			
			effects = {
				command = { }
			}
		}
		application = { 
			id = 5008
			name = "Basic Submarine Pressure Hull"
			desc = "Initial submarine experiments had hulls where they were kept underwater entirely by weight of the water in tanks.  This resulted in unreliable underwater performance due to the free surface effect of partially flooded ballast tanks.  This new design relies on horizontal rudders on the bow and stern called planes to maintain depth.  The submarine is designed to be neutrally buoyant with all of the ballast tanks full.  This gives the submarine better underwater performance."
			
			required = { }
			chance = 90
			cost = 2
			time = 180
			neg_offset = 20
			pos_offset = 40
			
			effects = {
				command = { }
			}
		}
		application = { 
			id = 5009
			name = "Basic Submarine Diesel Engine"
			desc = "Early submarines used simple gasoline engines for propulsion.  The problem with gasoline engines is the flammability of the fuel.  Gasoline fumes could build up in the hull where the proved to be a hazard to the crew and the submarine.  By using diesel for the fuel, it gave the submarine better range and better survivability."
			
			required = { 6034 }
			chance = 90
			cost = 2
			time = 180
			neg_offset = 20
			pos_offset = 40
			
			effects = {
				command = { }
			}
		}
		application = { 
			id = 5010
			name = "Basic Battery System"
			desc = "Initial submersible designs used human power while submerged.  This had limitation as to the size of the submarine and the underwater performance.  The inclusion of large banks of batteries would give the submarine the ability to move and maneuver while submerged."
			
			required = { }
			chance = 90
			cost = 2
			time = 180
			neg_offset = 20
			pos_offset = 40
			
			effects = {
				command = { }
			}
		}
		application = { 
			id = 5011
			name = "Basic Battery Charging System"
			desc = "This is system for recharging the battery banks that are used for underwater propulsion.  These chargers are connected to diesel engines that can only be used to charge the batteries while surfaced.  This limits the underwater endurance of submarines."
			
			required = { 5009 5010 }
			chance = 90
			cost = 2
			time = 180
			neg_offset = 20
			pos_offset = 40
			
			effects = {
				command = { }
			}
		}
		application = { 
			id = 5012
			name = "Basic Periscope"
			desc = "The periscope allows attacks to be made while submerged.  A periscope is basically a hollow tube fitted with mirrors that allows a lens above the water to transmit an image down to the commander in the conning tower.  The length of the periscope was what determined 'periscope depth' for the submarine.  This was the greatest depth that the submarine could submerge to and still be able to carry out an attack."
			
			required = { 6037 }
			chance = 90
			cost = 2
			time = 180
			neg_offset = 20
			pos_offset = 40
			
			effects = {
				command = { }
			}
		}
		application = { 
			id = 5013
			name = "Basic Submarine Torpedo"
			desc = "The torpedoes used on submarines was basically the same torpedo that was used by surface ships.  These torpedoes had to be modified to be used onboard the submarine.  The primary difference between submarine torpedoes and surface torpedoes was the diameter of the weapon.  Early submarines were too small to use the heavy 533mm (21 inch) torpedoes that were commonly used on surface ships.  The smaller torpedoes used by submarines meant that they had shorter range and smaller warheads than their surface launched counterparts."
			
			required = { 6035 }
			chance = 90
			cost = 2
			time = 180
			neg_offset = 20
			pos_offset = 40
			
			effects = {
				command = { }
			}
		}
		application = { 
			id = 5014
			name = "102mm Submarine Deck Gun"
			desc = "A deck gun for use on a submarine has several differences from a weapon of the same caliber used on a surface warship.  These guns have to be able to stay immersed in salt water for long periods of time and still be serviceable.  This requires waterproofing on the gun and its controls.  There also has to be a different ammunition supply method due to the limited space onboard the submarine."
			
			required = { 14250 }
			chance = 90
			cost = 2
			time = 180
			neg_offset = 20
			pos_offset = 40
			
			effects = {
				command = { }
			}
		}
		application = { 
			id = 5015
			name = "Basic Short Range Submarine"
			desc = "This is the first mass produced submarine design that is available.  These submarines have a very short range and are most useful for defense of coastlines and harbors.  Their short range prevents their use for extensive commerce interdiction.  Historically, this was the US L-class submarines and the German U-31 class U-boats."
			
			required = { 5006 5007 5008 5009 5010 5011 5012 5013 5014 }
			chance = 90
			cost = 2
			time = 180
			neg_offset = 20
			pos_offset = 40
			
			effects = {
				command = { type = new_model which = submarine value = 2 }
			}
		}

	} # Level 1
	
	level = { # 
		id = 5100
		name = "Great War Submarine Experience"
		desc = "The first world war was the first conflict where submarines took a large role in naval combat.  The Germans and British used their submarines from the beginning of the war in an anti-naval unit role.  They followed the 'rules of war' which said that commerce warfare would still work the same way that it worked during the Napoleonic Wars.  The introduction of unrestricted submarine warfare meant that any target in the warzone could be attacked without warning, warships and merchant vessels alike."
				
		cost = 4
		time = 180
		neg_offset = 45
		pos_offset = 90
		
		application = { 
			id = 5104
			name = "Improved Submarine Torpedo"
			desc = "Experience during the first world war allowed for improvements in the torpedoes that were to be used by the submarines.  One of the largest improvements was the increase in diameter in submarine torpedoes to 533mm (21 inch).  This allowed submarines to attack from longer ranges and have higher speed torpedoes."
			
			required = { 5013 }
			chance = 90
			cost = 2
			time = 180
			neg_offset = 20
			pos_offset = 40
			
			effects = {
				command = { }
			}
		}
		application = { 
			id = 5105
			name = "Improved Ballast Tank Design"
			desc = "The war showed the necessity of quick diving to escape attacks by destroyers.  The ballast tank design was improved by making the individual ballast tanks smaller and making the intakes for water larger.  This allowed that tanks to fill more quickly and allowed the submarine to dive more quickly."
			
			required = { 5008 }
			chance = 90
			cost = 2
			time = 180
			neg_offset = 20
			pos_offset = 40
			
			effects = {
				command = { }
			}
		}
		application = { 
			id = 5106
			name = "Mechanical Torpedo Reloading System"
			desc = "Reloading torpedoes can be a brutal process that was typically done while surfaced.  While operating in enemy waters it was difficult to accomplish.  A mechanical system replaced the manpower intensive system which relied on block and tackle dating from the days of sail.  This allowed torpedoes to be reloaded more quickly and while submerged."
			
			required = { 5013 }
			chance = 90
			cost = 2
			time = 180
			neg_offset = 20
			pos_offset = 40
			
			effects = {
				command = { }
			}
		}
		application = { 
			id = 5107
			name = "Gyro Compass"
			desc = "The development of the gyroscopic compass allowed for more accurate navigation while submerged.  A traditional magnetic compass works by a magnet that points toward magnetic north (different than true north).  This reading is further deviated by the steel of the hull and the movement of any metal within the hull.  A gyro compass works through a gyroscope which will track true north without error from the steel hull.  The drawback to this system is the size and weight of the gyro compass itself."
			
			required = { 6030 }
			chance = 90
			cost = 2
			time = 180
			neg_offset = 20
			pos_offset = 40
			
			effects = {
				command = { }
			}
		}
		application = { 
			id = 5108
			name = "Hydrostatic Depth Gauge"
			desc = "The pressure of the water can be used to determine the depth of the submarine.  A hydrostatic depth gauge works with a metal bellows which expands or is compressed depending on the depth of the water pressing on the bellows.  This bellow is attached through a set of gears to a needle which reads the depth on the gauge."
			
			required = { }
			chance = 90
			cost = 2
			time = 180
			neg_offset = 20
			pos_offset = 40
			
			effects = {
				command = { }
			}
		}
		application = { 
			id = 5109
			name = "Basic Hydrophones"
			desc = "A hydrophone is basically a microphone that can be mounted underwater.  This allows the submarine to hear destroyers that are hunting them, allowing them to better evade attacks.  These microphones were directional which also helped narrow down the location of the attacking destroyers."
			
			required = { 6309 }
			chance = 90
			cost = 2
			time = 180
			neg_offset = 20
			pos_offset = 40
			
			effects = {
				command = { }
			}
		}
		application = { 
			id = 5110
			name = "127mm Submarine Deck Gun"
			desc = "The 127mm (5 inch) deck gun is more powerful than the 102mm gun that was mounted on submarines prior to and during the Great War.  During the war, it was discovered that submarines often used their deck gun in attacks made while operating on the surface.  In part this was due to the fact that early submarines didn't carry many torpedoes, so they were fairly precious.  The 102mm gun was discovered to lack the stopping power for the larger merchant vessels that were being built.  The new 127mm gun fires a smaller shell than the standard surface model to ease the storage requirements."
			
			required = { 5014 14251 }
			chance = 90
			cost = 2
			time = 180
			neg_offset = 20
			pos_offset = 40
			
			effects = {
				command = { }
			}
		}
		application = { 
			id = 5111
			name = "Basic Medium Range Submarine"
			desc = "Operations outside the North Sea against British commerce, required a submarine with longer range and more firepower.  These submarines have the longer range required for operations outside of the littoral zone near the coast that is required for operations against protected convoys.  Historically, this was the British L-class submarines and German U-43 class U-Boats."
			
			required = { 5104 5105 5106 5107 5108 5109 5110 }
			chance = 90
			cost = 2
			time = 180
			neg_offset = 20
			pos_offset = 40
			
			effects = {
				command = { type = new_model which = submarine value = 3 }
			}
		}
	} # Level 2
	
	level = { # 
		id = 5200
		name = "Interwar Submarine Technology"
		desc = "After the Great War, most of the investment in naval technology slowed down.  Much of this was due to the Washington Naval Treaty, but another part of it was due to the state of the world economy.  Most of the nations (other than Germany) continued with submarine research, but with the surplus of submarines left over from the war, there was little new construction."
				
		cost = 4
		time = 360
		neg_offset = 45
		pos_offset = 90
		
		application = { 
			id = 5205
			name = "Improved Submarine Hull Shape"
			desc = "Submarine hulls had been optimized for operations on the surface.  With the emphasis on attacks from underwater, a higher priority was placed on underwater speed and maneuverability.  This required a longer hull form and larger control surfaces."
			
			required = { 5008 6025 }
			chance = 90
			cost = 2
			time = 180
			neg_offset = 20
			pos_offset = 40
			
			effects = {
				command = { }
			}
		}
		application = { 
			id = 5206
			name = "Improved Fuel Storage"
			desc = "Early submarines had their fuel tanks mounted outside of the pressure hull.  This made them vulnerable to damage and also allowed leaks from the riveted construction of the fuel tanks themselves.  By moving the fuel tanks inside the pressure hull, it protected them from damage and helped to keep the fuel from being contaminated by seawater."
			
			required = { 5008 }
			chance = 90
			cost = 2
			time = 180
			neg_offset = 20
			pos_offset = 40
			
			effects = {
				command = { }
			}
		}
		application = { 
			id = 5207
			name = "Improved Submarine Diesel Engine"
			desc = "Diesel engines were a relatively new technology when they started to be mounted in submarines.  These early diesel engines were not very reliable and were largely made individually.  The refinement of the technology allowed for better reliability of the engines and for increased production.  Another side effect of increased reliability was the decrease in fuel consumption.  This allowed the submarines to have greater range."
			
			required = { 5009 6520 }
			chance = 90
			cost = 2
			time = 180
			neg_offset = 20
			pos_offset = 40
			
			effects = {
				command = { }
			}
		}
		application = { 
			id = 5208
			name = "Long Range Submarine Radio Equipment"
			desc = "The use of long range radios on submarines allows for better coordination of attacks by individual submarines.  The ocean is a large area to search, so the ability to transmit sighting reports to a central location that can pass the information onto the other submarines gives a large advantage."
			
			required = { 6720 }
			chance = 90
			cost = 2
			time = 180
			neg_offset = 20
			pos_offset = 40
			
			effects = {
				command = { }
			}
		}
		application = { 
			id = 5209
			name = "Mechanical Torpedo Data Computer"
			desc = "The calculations for hitting a moving target with a torpedo requires a lot of calculations in order to have any chance of success.  Although these calculations are not difficult, they are time consuming.  By building a mechanical computer to perform these calculations, it makes the process faster and less prone to error.  The problem with these computers is the fact that while the calculations are being run, no part of the data can change.  This includes the course of the target and the course of the firing submarine."
			
			required = { 6532 }
			chance = 90
			cost = 3
			time = 360
			neg_offset = 20
			pos_offset = 40
			
			effects = {
				command = { type = naval_attack which = submarine when = on_upgrade value = 2 }
			}
		}
		application = { 
			id = 5210
			name = "Magnetic Influence Exploder"
			desc = "The magnetic detonator works by detecting the variances in the Earth's magnetic field that a metal ship hull creates.  As the torpedo moves through the water, it will detect the changes in the magnetic field and detonate under the target.  This will hopefully break the ship in two as it vents the force of the explosion straight up into the most vulnerable spot on the ship."
			
			required = { 5104 }
			chance = 90
			cost = 3
			time = 360
			neg_offset = 20
			pos_offset = 40
			
			effects = {
				command = { type = naval_attack which = submarine value = 1 }
				command = { type = supply_consumption which = submarine value = 0.3 }
			}
		}
		application = { 
			id = 5211
			name = "Acoustic Depth Sounder"
			desc = "This device is valuable for determining the depth of the water beneath the submarine.  This is important due to the errors that are present in the charts for many parts of the world.  If a submarine is unsure of the depth of the water beneath, then the submarine could be damaged during a dive.  The device sends out a sound wave which is bounced off the seafloor and received by a hydrophone.  It is a simple matter of calculating the distance based on the time it took for the signal to go from the boat to the seafloor and back."
			
			required = { 5108 5109 }
			chance = 90
			cost = 2
			time = 180
			neg_offset = 20
			pos_offset = 40
			
			effects = {
				command = { }
			}
		}
		application = { 
			id = 5212
			name = "Air Conditioning Equipment"
			desc = "Air conditioning is used to keep the interior of the submarine cool.  Air conditioning works by circulating a coolant through a closed system.  This coolant is pumped into the piping on the cooling side of the system under pressure.  This coolant is allowed to expand at a controlled rate.  The expansion of the coolant absorbs heat as it evaporates into a gas.  The gas is returned to a compressor which removes the heat and returns the coolant to a liquid form where it can be used for cooling again."
			
			required = { }
			chance = 90
			cost = 2
			time = 180
			neg_offset = 20
			pos_offset = 40
			
			effects = {
				command = { }
			}
		}
		application = { 
			id = 5213
			name = "Submarine Rescue Equipment"
			desc = "Diving the submarine beneath the surface is a dangerous undertaking.  Because the process is so dangerous, numerous accidents occurred during the development of submarines and following their deployment with the fleet.  This required the development of specialized equipment to rescue the submariners following an accident and to recover the submarine.  The equipment consists of a diving bell which is lowered from a support vessel located on the surface.  The diving bell is attached to one of the hatches on the submarine and the hatch is opened.  After the hatch is closed, the diving bell is raised to the surface.  The process is repeated until the entire crew has been evacuated."
			
			required = { 5007 13106 }
			chance = 90
			cost = 2
			time = 120
			neg_offset = 20
			pos_offset = 40
			
			effects = {
				command = { type = max_organization which = submarine value = 1 }
			}
		}
		application = { 
			id = 5214
			name = "Heavy Submarine Torpedo"
			desc = "The development of heavy torpedoes for surface ships allowed for longer range torpedoes that had larger warheads.  Unfortunately, submarine torpedo tubes were not as readily adaptable for conversion to the larger torpedo due to the physical location of the tubes as a part of the submarine's hull.  The submarine needs to be extensively modified to provide storage space and new torpedo tubes for the larger tubes."
			
			required = { 6733 13216 }
			chance = 90
			cost = 3
			time = 360
			neg_offset = 20
			pos_offset = 40
			
			effects = {
				command = { type = naval_attack which = submarine when = on_upgrade value = 2 }
				command = { type = supply_consumption which = submarine when = on_upgrade value = 0.3 }
			}
		}
		application = { 
			id = 5215
			name = "Submarine Launched Aircraft"
			desc = "The use of aircraft aboard a submarine would improve the ability of the submarine to scout for the battlefleet and to conduct independent operations.  The aircraft is housed in a watertight hanger mounted on the forward end of the submarine.  A catapult runs along the forward deck of the submarine for launching the aircraft.  The submarine is vulnerable to attack while air operations are happening.  The submarine has to remain on the surface while the aircraft is assembled and launched."
			
			required = { 6311 6412 6533 }
			chance = 90
			cost = 3
			time = 360
			neg_offset = 20
			pos_offset = 40
			
			effects = {
				command = { }
			}
		}
		application = { 
			id = 5216
			name = "152mm Submarine Deck Gun"
			desc = "Following the Great War, the concept was put forward of large 'cruiser submarines' armed with a heavy gun armament that would serve as commerce raiders in a time of war.  The main armament for these submarines is a 152mm (6 inch) gun which has been modified for use on submarines.  This gun has additional waterproofing, and a smaller shell to facilitate operations onboard the submarine."
			
			required = { 5110 14252 }
			chance = 90
			cost = 2
			time = 180
			neg_offset = 20
			pos_offset = 40
			
			effects = {
				command = { }
			}
		}
		application = { 
			id = 5217
			name = "Cruiser Submarine"
			desc = "The concept of the cruiser submarine grew out of the desire to have a submarine design that could also serve as a gunned commerce raider during wartime.  These submarines were characterized by a large gun armament, and a large hull.  The large hull made these submarines very slow to dive, and unmaneuverable while operating underwater.  Historically, this was the US Argonaught-class and the French Surcouf-class submarines."
			
			required = { 5111 5206 5207 5216 13106 }
			chance = 90
			cost = 2
			time = 180
			neg_offset = 20
			pos_offset = 40
			
			effects = {
				command = { type = new_model which = submarine value = 4 }
			}
		}
		application = { 
			id = 5218
			name = "Aircraft Carrying Submarine"
			desc = "These are large submarines designed to carry one or two floatplanes.  The submarine has a large hanger located forward of the conning tower which holds the aircraft partially assembled.  When it is time to launch the aircraft, it is moved out onto the forward deck where the final assembly takes place.  The aircraft is launched from a catapult that is mounted into the forward deck.  These aircraft are used for scouting purposes as well as independent operations like sneak air attacks.  Historically, this was the Japanese Kaigun Dai-class submarines."
			
			required = { 5215 5217 }
			chance = 90
			cost = 2
			time = 270
			neg_offset = 20
			pos_offset = 40
			
			effects = {
				command = { type = new_model which = submarine value = 1 }
			}
		}
		application = { 
			id = 5219
			name = "Basic Long Range Submarine"
			desc = "Operations in large ocean areas requires a lot of range.  The concept is to have the submarine able to have enough fuel and provisions to transit to the patrol site and still be able to return to base without further refueling.  This design is the culmination of the first generation of submarine designs.  They are designed to operate both against commerce and against enemy naval units.  Historically, this was the British Parthian-class submarines and German Type IXA-class U-Boats."
			
			required = { 5111 5205 5206 5207 5208 5211 5212 }
			chance = 90
			cost = 2 # prelim cost/time added
			time = 270 #
			neg_offset = 20
			pos_offset = 40
			
			effects = {
				command = { type = new_model which = submarine value = 6 }
			}
		}
		
	} # Level 3
	
	level = { # Early War Submarine Technology
		id = 5300
		name = "Early War Submarine Technology"
		desc = "The next generation of submarines was designed using the experience that was gained during the period between the two world wars.  The technology that was developed would be used to design the next generation of submarines that would form the backbone of submarine forces for most of the war."
				
		cost = 4
		time = 720
		neg_offset = 45
		pos_offset = 90
		
		application = { 
			id = 5305
			name = "Improved Submarine Pressure Hull"
			desc = "Improvements in anti-submarine tactics and equipment meant that submarines had to be able to operate at deeper depths than before.  Early submarines were able to operate at depths of around 60m (200 ft).  If this could be increased, it would allow submarines to operate deeper than the operational depth for depth charges.  These pressure hulls are designed to operate at depths of 75m (250 ft)."
			
			required = { 5008 5205 }
			chance = 90
			cost = 2
			time = 180
			neg_offset = 20
			pos_offset = 40
			
			effects = {
				command = { }
			}
		}
		application = { 
			id = 5306
			name = "Improved Battery Systems"
			desc = "Improvements in energy storage technology found there way into the submarines.  These improvements resulted in batteries that could hold two or three times the charge of previous cells.  These cells were installed in chains within the hull to provide power while the submarine was operating underwater."
			
			required = { 5010 6722 }
			chance = 90
			cost = 2
			time = 180
			neg_offset = 20
			pos_offset = 40
			
			effects = {
				command = { }
			}
		}
		application = { 
			id = 5307
			name = "Improved Battery Charging Systems"
			desc = "The difficulty with previous charging systems was the use of separate propulsion and charging engines.  This resulted in a large percentage of the hull volume being taken up by the engineering spaces.  The new concept uses the same engines for propulsion and battery charging.  The generator used for charging is attached to a power take off on the forward side of the diesel engine.  The power that the engine can devote to moving the submarine is reduced while charging, but it frees up space within the hull for additional torpedo storage."
			
			required = { 5011 5207 5306 }
			chance = 90
			cost = 2
			time = 180
			neg_offset = 20
			pos_offset = 40
			
			effects = {
				command = { }
			}
		}
		application = { 
			id = 5308
			name = "Basic Air Scrubbers"
			desc = "During attacks by enemy anti-submarine forces, one of the limiting factors was the amount of time that the submarine could stay submerged.  The amount of oxygen was the main limiting factor.  When carbon dioxide level reached 7% it would be fatal to the crew.  The first type of air scrubber was basically a fire fighting OBA (Oxygen Breathing Apparatus) canister which would use a chemical process to emit oxygen.  This was a limited solution as it would only give additional time measured in minutes, but sometimes that would be enough to make the difference between survival and destruction."
			
			required = { 5212 }
			chance = 90
			cost = 2
			time = 180
			neg_offset = 20
			pos_offset = 40
			
			effects = {
				command = { }
			}
		}
		application = { 
			id = 5309
			name = "Welded Hull Construction"
			desc = "The use of welding made the submarine hull stronger.  With a riveted hull, the hull plates are held together with large metal studs.  With welding the two plates are joined on the edge effectively making one plate.  This means that the structure of the hull in stronger.  The stronger hull means that the submarine can dive deeper and be built more quickly."
			
			required = { 4801 5205 5305 }
			chance = 90
			cost = 3
			time = 360
			neg_offset = 20
			pos_offset = 40
			
			effects = {
				command = { type = max_organization which = submarine value = 1 }
				command = { type = naval_defense which = submarine when = on_upgrade value = 1 }
				command = { type = air_defense which = submarine when = on_upgrade value = 1 }
				command = { type = build_time which = submarine value = -5 }
			}
		}
		application = { 
			id = 5310
			name = "Improved Short Range Submarine"
			desc = "Improvements in the design of submarines are usually incorporated into smaller submarines before they are brought into the mainline fleet boats.  The improvements in pressure hull construction and power were fairly easy to adapt to the short range submarines.  Historically, this was the German Type IID-class U-Boats."
			
			required = { 5015 5205 5207 5208 5305 5306 5307 5308 }
			chance = 90
			cost = 2
			time = 180
			neg_offset = 20
			pos_offset = 40
			
			effects = {
				command = { type = new_model which = submarine value = 5 }
			}
		}
		application = { 
			id = 5311
			name = "Improved Medium Range Submarine"
			desc = "The improvements in the hulls and power plants for submarines meant that the units were much more capable than before.  Their range was longer, and they were more effective at attacking protected convoys with their higher speeds.  These were the mainline submarines that served as the heart of most nation's submarine forces for most of the war.  Historically, this was the German Type VIIC-class U-Boats and Italian Marcello-class submarines."
			
			required = { 5111 5205 5207 5208 5305 5306 5307 5308 }
			chance = 90
			cost = 2
			time = 180
			neg_offset = 20
			pos_offset = 40
			
			effects = {
				command = { type = new_model which = submarine value = 7 }
			}
		}

	} # Level 4
	
	level = { # Improved Submarine Construction 
		id = 5400
		name = "Early War Submarine Experience" 
		desc = "With the outbreak of war, it was discovered that many of the preconceptions that effected submarine designs during the interwar period were no longer valid.  One of the big differences was the almost immediate start to unrestricted submarine warfare.  Although many countries had agreed that submarines would follow the 'Rules of War' in the regard of prize laws.  Merchant ships were armed with weapons which meant that submarines had to make attacks without warning to avoid attacks.  This meant that new equipment had to be developed to operate under these conditions."
				
		cost = 4
		time = 720
		neg_offset = 45
		pos_offset = 90
		

		application = { 
			id = 5406
			name = "Electric Torpedo"
			desc = "The use of electric propulsion was experimented with before the war, but battery technology wasn't able to give the torpedo sufficient range to be effective.  With advances in battery technology, the concept of an electric torpedo became viable.  Electric torpedoes didn't leave a wake on the surface to alert the target of the incoming torpedo.  It also meant that it was more difficult for the escorting destroyers to trace where the torpedo came from and attack the submarine."
			
			required = { 5104 5306 }
			chance = 90
			cost = 2
			time = 180
			neg_offset = 20
			pos_offset = 40
			
			effects = {
				command = { type = naval_attack which = submarine value = 1 }
				command = { type = supply_consumption which = submarine value = 0.1 }
			}
		}
		application = { 
			id = 5407
			name = "Supply Submarine"
			desc = "One of the difficulties with submarine operations was insufficient supplies and range for extended operations.  This meant that a method had to be devised to supply submarines while still at sea.  Early in the war, a complex network of merchant vessels was used to resupply the submarines at sea, but they proved vulnerable to attack.  The solution to this was to build a submarine that could resupply other submarines at sea.  Historically, this was the German Type XIV-class (milch-cow) U-Boat."
			
			required = { 5217 13106 13211 }
			chance = 90
			cost = 2
			time = 180
			neg_offset = 20
			pos_offset = 40
			
			effects = {
				command = { type = max_organization which = submarine value = 1 }
				command = { type = range which = submarine value = 1000 }
			}
		}
		application = { 
			id = 5408
			name = "Improved Hydrophones"
			desc = "Improvements in electronics allowed for improvements in detection equipment.  These new hydrophones were more precise than the old 'Y Tube' detectors that were previously mounted.  These new detectors had numerous receivers that were directional.  These hydrophones are placed in an arc that will allow for more precise directional information.  This allowed the submarine to make more effective attacks and evade counterattacks more easily."
			
			required = { 5109 6923 }
			chance = 90
			cost = 2
			time = 180
			neg_offset = 20
			pos_offset = 40
			
			effects = {
				command = { type = max_organization which = submarine when = on_upgrade value = 2 }
				command = { type = visibility which = submarine when = on_upgrade value = -2 }
			}
		}
		application = { 
			id = 5409
			name = "Improved Periscope"
			desc = "Improvements in optics for fire control systems allowed for improvements in periscope technology as well.  The visual accuracy allowed for better ranging of targets.  The ranging was accomplished by using the height of the target on a reticle within the periscope.  These more accurate optics will make the submarine more effective."
			
			required = { 5012 6530 }
			chance = 90
			cost = 2
			time = 180
			neg_offset = 20
			pos_offset = 40
			
			effects = {
				command = { }
			}
		}
		application = { 
			id = 5410
			name = "Analog Filters"
			desc = "These are simple sound filters that will allow the operator to filter out background noise.  This is important in detecting targets at a distance.  By being able to pick up a target at a distance allows the submarine to move into position ahead of the target and track it longer.  It also allows the submarine to make more effective evasive maneuvers while avoiding attacking escorts."
			
			required = { 5408 }
			chance = 90
			cost = 2
			time = 180
			neg_offset = 20
			pos_offset = 40
			
			effects = {
				command = { type = surface_detection which = submarine when = on_upgrade value = 1 }
			}
		}
		application = { 
			id = 5411
			name = "Basic Decimetric Radar Detector"
			desc = "Radar removed the advantage of darkness from the submarine.  Enemy surface ships and planes with decimetric radar sets were able to detect the surfaced submarines still on the surface.  The decimetric radar detector would allow the submarine to start diving before the radar signal would reach sufficient levels that the submarine would be detected.  Historically, this was the German Metox radar detector."
			
			required = { 6718 }
			chance = 90
			cost = 2
			time = 180
			neg_offset = 20
			pos_offset = 40
			
			effects = {
				command = { type = naval_defense which = submarine when = on_upgrade value = 1 }
				command = { type = air_defense which = submarine when = on_upgrade value = 1 }
			}
		}
		application = { 
			id = 5412
			name = "Basic Submarine Anti-Aircraft Gun"
			desc = "The increase in the number of attacks on submarines by aircraft was causing losses.  In order to counter these attacks, anti-aircraft guns had to be mounted.  These guns were different than the standard guns mounted on surface ships.  These guns were more waterproof due to the requirement for continuous immersion in salt water while the submarine was submerged.  Minimizing corrosion was important to prevent misfires."
			
			required = { 14012 }
			chance = 90
			cost = 2
			time = 180
			neg_offset = 20
			pos_offset = 40
			
			effects = {
				command = { type = air_attack which = submarine when = on_upgrade value = 1 }
			}
		}
		application = { 
			id = 5413
			name = "Torpedo Testing Program"
			desc = "Experience early in the war showed that there were reliability problems with torpedoes.  Testing prior to the war was carried out under ideal conditions.  War shots were made at less than ideal angles and conditions.  As submarines came back into port reports were filed stating that the torpedoes were faulty.  Initially, the reports were dismissed as commanders trying to cover the fact that they were missing the target.  Eventually, it was realized that there really was something wrong with the torpedoes.  Further testing narrowed down the problems and allowed remedies to be found."
			
			required = { 5104 4803 }
			chance = 90
			cost = 3
			time = 180
			neg_offset = 20
			pos_offset = 40
			
			effects = {
				command = { type = max_organization which = submarine value = 2 }
				command = { type = naval_attack which = submarine value = 1 }
			}
		}
		application = { 
			id = 5414
			name = "Improved Long Range Submarine"
			desc = "Improvements in the technology available for submarine construction allowed for improvements in the standard 'fleet boats' that made up the long range striking arms of most of the users of submarines.  These boats were more capable than their predecessors through increased ability to remain submerged, higher submerged speeds, and better detection equipment.  Historically, this was the US Gato-class, British T-class submarines and German Type-IX class U-Boats."
			
			required = { 5219 5305 5306 5307 5308 5409 }
			chance = 90
			cost = 3 
			time = 180 
			neg_offset = 20
			pos_offset = 40
			
			effects = {
				command = { type = new_model which = submarine value = 9 }
			}
		}

	} # Level 5
	
	level = { # 
		id = 5500
		name = "Middle War Experience"
		desc = "AS the war progressed, experience continued to find better ways for submarines to operate and to be built.  Tactics and equipment that were good were updated and improved.  Pre-war ideas that were obsolete were discarded.  This made the submarine force more formidable."
				
		cost = 4
		time = 720
		neg_offset = 45
		pos_offset = 90
		
		application = { 
			id = 5506
			name = "Snorkel Experimentation"
			desc = "The concept of the snorkel is simple.  Extend a pipe above the surface of the water to provide air for the diesels while the submarine is submerged.  Although the concept is simple, the execution of the idea is more complex.  The pipe that is extended above water has to have a reliable means for shutting to keep water out in the event that it goes beneath the surface.  The other problem is how to deploy the mast which contains the snorkel.  This meant that there needed to be a long period of testing and evaluation before the new tool could be used with operational units."
			
			required = { 6722 13416 }
			chance = 90
			cost = 4
			time = 180
			neg_offset = 20
			pos_offset = 40
			
			effects = {
				command = { }
			}
		}
		application = { 
			id = 5507
			name = "Closed Cycle Engine Experimentation"
			desc = "Improvements in anti-submarine equipment and tactics meant that submarines are having to spend more time submerged.  The limitations of batteries meant that the range and maneuverability of the submarine was more limited while the submarine was submerged.  The concept of the closed cycle engine is that compressed oxygen is stored onboard the submarine for use in powering the diesel engine while the submarine is submerged.  This is only done while the submarine can't use its snorkel or other air breathing device to conserve the supply of oxygen."
			
			required = { 6722 13416 }
			chance = 90
			cost = 4
			time = 180
			neg_offset = 20
			pos_offset = 40
			
			effects = {
				command = { }
			}
		}
		application = { 
			id = 5508
			name = "Walter Turbine Engine Experimentation"
			desc = "Improvements in anti-submarine equipment and tactics meant that submarines were having to spend more time submerged.  This meant that methods had to be discovered that would allow the submarine to run submerged for longer periods of time in order to evade attacking escorts.  A Walter engine runs on Hydrogen Peroxide.  The oxygen is already contained in the fuel, so no external source of oxygen is necessary.  This means that the boat can run for extended periods of time submerged without needing air for the engines.  The difficulty with the Hydrogen Peroxide is the flammability of the fuel.  It is extremely flammable and poses an extreme explosion hazard."
			
			required = { 6722 7202 7303 13416 }
			chance = 90
			cost = 4
			time = 180
			neg_offset = 20
			pos_offset = 40
			
			effects = {
				command = { }
			}
		}
		application = { 
			id = 5509
			name = "Modular Submarine Construction"
			desc = "Submarines are remarkably suited to modular construction.  The cylinders which make up the submarine's pressure hull are fairly easy to manufacture and then stick on a railroad car for transportation to the shipyard.  This means that the resources of the shipyard can be focused on assembling the submarine and any technical work that has to be done for completion."
			
			required = { 4802 }
			chance = 90
			cost = 2
			time = 360
			neg_offset = 20
			pos_offset = 40
			
			effects = {
				command = { type = build_time which = submarine value = -10 }
				command = { type = build_cost which = submarine value = -1 }
			}
		}
		application = { 
			id = 5510
			name = "Submarine Shoreline Reconnaissance"
			desc = "The use of submarines to scout enemy facilities and landing locations allowed for better intelligence to be gained.  Unfortunately, this meant that the submarine would be required to enter shallow waters that would make detection easier.  Once in the area where the observations were to be made, the submarine would take pictures through the periscope.  The benefit of the intelligence data was believed to outweigh the increased risk to the submarine."
			
			required = { 5409 13309 }
			chance = 90
			cost = 2
			time = 180
			neg_offset = 20
			pos_offset = 40
			
			effects = {
				command = { type = army_detection value = 1 }
				command = { type = shore_attack which = marine value = 1 }
				command = { type = shore_attack which = infantry value = 1 }
			}
		}
		application = { 
			id = 5511
			name = "Submarine-Aircraft Coordination"
			desc = "One of the most difficult jobs for submarines on patrol was finding targets to attack.  By coordinating with aircraft, the effective sighting range of the submarines was increased.  The aircraft would be launched to find convoys and other targets.  When a target was found, the position was radioed to a central control center which would pass on the information to the proper submarines"
			
			required = { 13112 13311 }
			chance = 90
			cost = 2
			time = 180
			neg_offset = 20
			pos_offset = 40
			
			effects = {
				command = { type = max_organization which = submarine value = 1 }
				command = { type = surface_detection which = submarine value = 1 }
			}
		}
		application = { 
			id = 5512
			name = "Pattern Running Torpedo"
			desc = "The pattern running torpedo is very important for use against convoys.  Many attacks failed because the torpedo simply missed the target.  Even in a convoy where many targets are bunched together, the odds of hitting a ship on the far side of the target were remote.  A pattern running torpedo increased the odds by giving the torpedo more chances to hit a target in the tightly bunched convoys.  The pattern run could be selected by the captain depending on the configuration of the convoy.  The captain could choose from a ladder pattern which would advance either right or left along the course of the convoy in long legs, or a snake pattern which would weave back and forth along a course line."
			
			required = { 3103 5209 5413 }
			chance = 90
			cost = 3
			time = 180
			neg_offset = 20
			pos_offset = 40
			
			effects = {
				command = { type = naval_attack which = submarine when = on_upgrade value = 1 }
				command = { type = supply_consumption which submarine when = on_upgrade value = 0.1 }
			}
		}
		application = { 
			id = 5513
			name = "Acoustic Countermeasures"
			desc = "With the increasing accuracy of sonar/asdic, it was realized that something had to be done to help submarines that had been detected.  A series of countermeasures were developed to create false targets on the enemy sonar.  These took a number of different shapes.  The most simple was a neutrally buoyant balloon which when released, would float underwater creating a target.  Another type was canister which would release bubbles which would reflect the sound waves creating a false target."
			
			required = { 5408 }
			chance = 90
			cost = 2
			time = 180
			neg_offset = 20
			pos_offset = 40
			
			effects = {
				command = { type = naval_defense which = submarine when = on_upgrade value = 1 }
				command = { type = visibility which = submarine when = on_upgrade value = -1 }
			}
		}
		application = { 
			id = 5514
			name = "Basic Submarine Centimetric Radar"
			desc = "This is a small radar set which is attached to a mast on the submarine.  The radar allows the submarine to accurately get the range of a target and attack more accurately.  It also allows the submarine to detect targets at greater range than is possible with just lookouts alone.  These radar antennas are specially constructed to allow them to be immersed in salt water for long periods of time."
			
			required = { 6922 }
			chance = 90
			cost = 2
			time = 180
			neg_offset = 20
			pos_offset = 40
			
			effects = {
				command = { type = surface_detection which = submarine when = on_upgrade value = 2 }
				command = { type = night_attack which = submarine when = on_upgrade value = 5 }
			}
		}
		application = { 
			id = 5515
			name = "Basic Submarine Centimetric Radar Detector"
			desc = "When aircraft radar sets were converted from decimetric to centimetric wavelengths, the current radar detectors were unable to detect attacking aircraft.  This meant that a new detector had to be developed to enable the submarine to detect potential attackers before they are in range to attack.  These detectors are specially constructed to be quickly assembled and disassembled.  This allows them to be set-up and taken down while running on the surface and eliminate the need for extensive waterproofing."
			
			required = { 5411 5514 }
			chance = 90
			cost = 2
			time = 180
			neg_offset = 20
			pos_offset = 40
			
			effects = {
				command = { type = naval_defense which = submarine when = on_upgrade value = 1 }
			}
		}
		application = { 
			id = 5516
			name = "Improved Waterproof Anti-Aircraft Guns"
			desc = "The improvements in the ability of aircraft to attack submarines meant that it could be easier for the submarine to stay on the surface and fight the aircraft.  This meant that the number and size of the anti-aircraft had to be improved.  Large platforms are constructed on the forward and after sides of the conning tower where the guns can have large fields of fire.  This modification slows down the submarine because of the added weight and drag of the platforms and the guns."
			
			required = { 5412 14264 }
			chance = 90
			cost = 2
			time = 180
			neg_offset = 20
			pos_offset = 40
			
			effects = {
				command = { type = air_attack which = submarine when = on_upgrade value = 2 }
				command = { type = air_defense which = submarine when = on_upgrade value = 1 }
				command = { type = build_time which = submarine value = 5 }
				command = { type = speed which = submarine when = on_upgrade value = -2 }
			}
		}

	} # Level 6
	
	level = { # 
		id = 5600
		name = "Late War Submarine Technology"
		desc = "As the war continued, naval architects were able to come up with design solutions that would allow the next generation of submarines to be more survivable.  These design improvements combined with new technologies would make these submarines the most technologically advanced that would be produced during the war."
				
		cost = 4
		time = 540
		neg_offset = 45
		pos_offset = 90
		
		application = { 
			id = 5606
			name = "Advanced Submarine Pressure Hull"
			desc = "Improvements in design and construction of the pressure hull meant that the next generation of submarines would have better operational ability.  They would be able to dive deeper and be more resistant to damage.  Much of this additional strength comes from the ability to distribute the stress more evenly over the surface of the pressure hull through the use of welding the seams."
			
			required = { 5305 5309 }
			chance = 90
			cost = 2
			time = 180
			neg_offset = 20
			pos_offset = 40
			
			effects = {
				command = { }
			}
		}
		application = { 
			id = 5607
			name = "Streamlined Hull Form"
			desc = "With the development of propulsion systems that allowed the submarine to remain submerged for longer periods of time meant that underwater performance became more important than surfaced performance.  The idea was to eliminate sharp edges which reduce the underwater performance and also provide surfaces for air bubbles to develop which makes the submarine noisy while running submerged.  The flooding system also had to be redesigned to eliminate the large free flooding holes in the exterior of the hull."
			
			required = { }
			chance = 90
			cost = 2
			time = 180
			neg_offset = 20
			pos_offset = 40
			
			effects = {
				command = { }
			}
		}
		application = { 
			id = 5608
			name = "Advanced Submarine Diesel Engine"
			desc = "The new diesel engine technology is mainly concerned with getting more horsepower out of a smaller package.  By developing smaller diesel engines it would free up valuable internal space for other equipment.  The improvements would also allow the fuel efficiency of the new engines to be improved.  This would allow the submarines to operate at longer ranges from their bases."
			
			required = { 5207 6520 }
			chance = 90
			cost = 2
			time = 180
			neg_offset = 20
			pos_offset = 40
			
			effects = {
				command = { }
			}
		}
		application = { 
			id = 5609
			name = "Advanced Battery Systems"
			desc = "Improvements in the batteries used in submarines would give them extra range while submerged.  The use of different metals than the traditional lead meant that the batteries would be more efficient during charging and discharging the energy.  These batteries are also more resistant to damage because they can be sealed.  Previous batteries tended to leak when exposed to extreme lists or trim.  By sealing the battery it would reduce the deadly chlorine gas that occurred when acid was mixed with seawater."
			
			required = { 5306 6967 }
			chance = 90
			cost = 2
			time = 180
			neg_offset = 20
			pos_offset = 40
			
			effects = {
				command = { }
			}
		}
		application = { 
			id = 5610
			name = "Advanced Battery Charging Systems"
			desc = "The improvements that allowed small generators to be used to provide emergency power for damage control allowed the generators used for recharging the batteries to be made smaller.  These improvements included advances in the tightness of the windings within the culminator and the efficiency of the generator."
			
			required = { 5307 }
			chance = 90
			cost = 2
			time = 180
			neg_offset = 20
			pos_offset = 40
			
			effects = {
				command = { }
			}
		}
		application = { 
			id = 5611
			name = "Advanced Periscope"
			desc = "Although the concept behind the periscope is simple, it is possible to find way to improve the periscope.  The optics that make up part of the periscope are the first step in improving performance.  Better manufactured optics will make estimates of heights and bearings more accurate.  There are also improvements that can be made in the ability of the periscope to resist damage."
			
			required = { 5409 6915 }
			chance = 90
			cost = 2
			time = 180
			neg_offset = 20
			pos_offset = 40
			
			effects = {
				command = { }
			}
		}
		application = { 
			id = 5612
			name = "Advanced Hydrophones"
			desc = "Improvements in electronics allowed for more precise hydrophones to be developed.  The improvement in the accuracy in the hydrophones would allow effective attacks to be made without having to visually track the target through the periscope.  This meant that an attack could be made without having to expose the submarine on the surface.  More accurate hydrophones also allowed the submarine to make more efficient evasion maneuvers because they could more accurately track the attacking destroyers."
			
			required = { 5408 5410 6952 }
			chance = 90
			cost = 2
			time = 180
			neg_offset = 20
			pos_offset = 40
			
			effects = {
				command = { type = surface_detection which = submarine when = on_upgrade value = 1 }
				command = { type = sub_detection which = submarine when = on_upgrade value = 1 }
			}
		}
		application = { 
			id = 5613
			name = "Advanced Short Range Submarine"
			desc = "The improvements in the technology available for constructing submarines resulted in a new generation of submarines.  The smaller, short range submarines were the first ones that benefited from the improved technology.  The small submarines were more able to penetrate the anti-submarine screens for enemy convoys and task forces and evade counterattacks by enemy destroyers.  Historically, this was the German Type IID-class U-Boats."
			
			required = { 5310 5606 5607 5608 5609 5610 5611 }
			chance = 90
			cost = 3
			time = 180
			neg_offset = 20
			pos_offset = 40
			
			effects = {
				command = { type = new_model which = submarine value = 8 }
			}
		}
		application = { 
			id = 5614
			name = "Advanced Medium Range Submarine"
			desc = "The improvements in the technology available for constructing submarines resulted in submarines that were superior to their predecessors in both attack and defense.  The medium range submarine was designed to be mass produced and be used to cut the lines of communications of the enemy.  These submarines are more capable of penetrating the anti-submarine screens of enemy convoys and then evade counterattacks.  Historically, this was the German Type VII/42-class U-Boats."
			
			required = { 5311 5606 5607 5608 5609 5610 }
			chance = 90
			cost = 3
			time = 180
			neg_offset = 20
			pos_offset = 40
			
			effects = {
				command = { type = new_model which = submarine value = 10 }
			}
		}

	} # Level 7
	
	level = { # Late War Experience
		id = 5700
		name = "Late War Submarine Experience"
		desc = "As the war continued, more operational experience was gained.  At the beginning of the war, submarines had been able to make attacks with little to worry from counterattacking destroyers and aircraft.  As anti-submarine experience improved, submarine losses started to increase at frightening rates.  Measures had to be developed to enable the submarine to remain effective in this more deadly environment."
				
		cost = 4
		time = 360
		neg_offset = 45
		pos_offset = 90
		
		application = { 
			id = 5708
			name = "Deck Gun Removal"
			desc = "As submerged attacks became more of a necessity, it became apparent that the deck gun was becoming obsolete.  The development of radar meant that submarines were no longer able to make night attacks on the surface.  The removal of the deck gun would have the added benefit of increasing the submerged speed of the submarine because of the reduced drag from removing the deck gun.  This also made the submarine quieter by removing a source of noise from the water swirling around the parts of the gun."
			
			required = { 5607 13311 }
			chance = 90
			cost = 2
			time = 180
			neg_offset = 20
			pos_offset = 40
			
			effects = {
				command = { type = speed which = submarine when = on_upgrade value = 2 }
				command = { type = naval_defense which = submarine when = on_upgrade value = 1 }
				command = { type = naval_attack which = submarine when = on_upgrade value = -1 }
				command = { type = visibility which = submarine when = on_upgrade value = -5 }
				command = { type = build_time which = submarine when = on_upgrade value = -5 }
			}
		}
		application = { 
			id = 5709
			name = "Snorkel Deployment"
			desc = "The development of the snorkel didn't just include the development of the hardware itself, but also included the development of the tactics necessary to utilize the new system in combat.  The use of the snorkel would enable the submarine to recharge their batteries while operating submerged.  This will allow the submarine to avoid one of the most vulnerable periods in their operations; operating on the surface while recharging their batteries.  The snorkel is fitted to a retractable mast on the conning tower of the submarine and is fitted with a valve that will prevent water from entering the submarine while submerged."

			
			required = { 5506 }
			chance = 90
			cost = 3
			time = 180
			neg_offset = 20
			pos_offset = 40
			
			effects = {
				command = { type = naval_defense which = submarine when = on_upgrade value = 2 }
				command = { type = visibility which = submarine when = on_upgrade value = -5 }
			}
		}
		application = { 
			id = 5710
			name = "Closed Cycle Engine Deployment"
			desc = "The concept of the closed cycle engine is to give the submarine a way to supply oxygen to the engines while running submerged.  This is accomplished by having compressed oxygen in cylinders supply oxygen for the engines.  This allows the engines to be run when the submarine is unable to use the snorkel or surface.  Unfortunately, this is a capability that has to be built into the submarine and can't be retrofitted into existing hulls."
			
			required = { 5507 }
			chance = 90
			cost = 3
			time = 180
			neg_offset = 20
			pos_offset = 40
			
			effects = {
				command = { }
			}
		}
		application = { 
			id = 5711
			name = "Walter Turbine Engine Deployment"
			desc = "The Walter Engine is a revolutionary concept for providing propulsive power while operating submerged.  The Walter Turbine Engine uses nearly pure hydrogen-peroxide and breaks it down into its base components of hydrogen and oxygen.  This mixture was hot enough to generate steam.  Diesel fuel was injected into the hot mixture which increased the temperature and pressure of the steam.  This steam was injected into specially built turbines to provide propulsion.  This turbine propulsion allows the submarine to be maneuvered at high submerged speeds.  The drawbacks to this system were the highly corrosive effects of the fuel itself and the high volatility of the fuel which would explode if not handled correctly."
			
			required = { 5508 }
			chance = 90
			cost = 3
			time = 180
			neg_offset = 20
			pos_offset = 40
			
			effects = {
				command = { }
			}
		}
		application = { 
			id = 5712
			name = "Improved Centimetric Submarine Radar"
			desc = "Improvements in radar technology allowed the radar antenna to be made smaller.  This allowed the antenna to be mounted on more submarines.  The improvements also allowed the radar to be used while the submarine was operating submerged.  A waveguide is placed into the periscope tube which will allow for more accurate ranging of targets.  This makes the periscope head slightly larger, but the advantage of being able to use the radar while submerged is a significant improvement."
			
			required = { 5514 5611 6951 }
			chance = 90
			cost = 2
			time = 180
			neg_offset = 20
			pos_offset = 40
			
			effects = {
				command = { type = surface_detection which = submarine when = on_upgrade value = 1 }
				command = { type = naval_attack which = submarine when = on_upgrade value = 1 }
				command = { type = night_attack which = submarine when = on_upgrade value = 5 }
			}
		}
		application = { 
			id = 5713
			name = "Acoustic Homing Torpedo"
			desc = "The acoustic homing torpedo uses the noise generated by the target's propeller to home on the target.  The torpedo has four hydrophones spaced around the body of the torpedo.  The torpedo is designed to turn the torpedo towards the loudest sound source.  The torpedo can search in both the horizontal and vertical planes.  The space in the torpedo that is needed for the hydrophones means that these torpedoes have a smaller warhead than other torpedoes, but it is usually sufficient to disable an attacking escort rather than necessarily sink it."
			
			required = { 5406 5512 5612 }
			chance = 90
			cost = 2
			time = 180
			neg_offset = 20
			pos_offset = 40
			
			effects = {
				command = { type = naval_attack which = submarine value = 1 }
				command = { type = naval_defense which = submarine value = 1 }
				command = { type = supply_consumption which = submarine value = 0.3 }
			}
		}
		application = { 
			id = 5714
			name = "Advanced Long Range Submarine"
			desc = "Improvements in the equipment available for constructing submarines was incorporated into the designs for long range submarines.  These submarines are able to use their improved designs to make more effective attacks on enemy convoys and task forces.  Historically, this was the US Tench-class and British U-class submarines."
			
			required = { 5414 5606 5607 5608 5609 5610 5611 }
			chance = 90
			cost = 3
			time = 180
			neg_offset = 20
			pos_offset = 40
			
			effects = {
				command = { type = new_model which = submarine value = 12 }
			}
		}
		application = { 
			id = 5715
			name = "Basic Closed-Cycle Short Range Submarine"
			desc = "The development of the closed-cycle engine meant that submarines could be developed that could use their engines for a short period of time while operating submerged.  This is accomplished through using liquefied oxygen contained in tanks to supply air to the diesel engine while submerged.  The space taken up by the oxygen tanks means that the torpedo complement is limited.  Historically this was the Soviet Project 618 prototype submarine."
			
			required = { 5613 5709 5710 }
			chance = 90
			cost = 3
			time = 180
			neg_offset = 20
			pos_offset = 40
			
			effects = {
				command = { type = new_model which = submarine value = 14 }
			}
		}
		application = { 
			id = 5716
			name = "Basic Closed-Cycle Medium Range Submarine"
			desc = "The development of the closed-cycle engine meant that submarines could be developed that could use their engines for a short period of time while operating submerged.  This is accomplished through using liquefied oxygen contained in tanks to supply air to the diesel engine while submerged.  These submarines are larger than other medium ranged submarines due to the requirement of fitting large tanks to carry the liquefied oxygen.  Historically, this was a number of prototypes developed by Germany and utilized by the other nations following the armistice."
			
			required = { 5614 5709 5710 }
			chance = 90
			cost = 3
			time = 180
			neg_offset = 20
			pos_offset = 40
			
			effects = {
				command = { type = new_model which = submarine value = 16 }
			}
		}
		application = { 
			id = 5717
			name = "Basic Walter Engine Short Range Submarine"
			desc = "The Walter Turbine allowed a submarine to make short bursts of submerged speed.  The Walter Turbine converted hydrogen peroxide into steam which powered the turbine when combined with diesel fuel.  The turbine required large volumes of fuel to operate which meant that the submarine used a lot of the volume available for the storage of fuel.  This meant that less volume was available for diesel which gave these submarines less range.  Historically, this was the German Type XXII-class U-Boats."
			
			required = { 5613 5709 5711 }
			chance = 90
			cost = 3
			time = 180
			neg_offset = 20
			pos_offset = 40
			
			effects = {
				command = { type = new_model which = submarine value = 15 }
			}
		}
		application = { 
			id = 5718
			name = "Basic Walter Engine Medium Range Submarine"
			desc = "The Walter Turbine Engine allowed a submarine to make short bursts of speed while submerged.  The Walter Turbine converted hydrogen peroxide into steam which powered the turbine when combined with diesel fuel.  The turbine required large volumes of hydrogen peroxide to operate which meant that the submarine used a lot of the volume available for the storage of fuel.  This meant that the submarine is larger than other medium range submarines.  The volume used for the hydrogen peroxide means that the range is reduced compared to other medium range submarines.  Historically, this is the German Type XXVII class U-Boats."
			
			required = { 5614 5709 5711 }
			chance = 90
			cost = 3
			time = 180
			neg_offset = 20
			pos_offset = 40
			
			effects = {
				command = { type = new_model which = submarine value = 17 }
			}
		}

	} # Level 8
	
	level = { # 
		id = 5800
		name = "Semi-Modern Submarine Technology"
		desc = "The improvements in submarine building technology would provide the technology that would lead the submarine into the post-war period.  This technology was developed in response to the improvements in anti-submarine technology that was making life difficult for the submarine.  Most of these technologies were designed to give the submarine increased ability to attack and move while submerged."
				
		cost = 4
		time = 360
		neg_offset = 45
		pos_offset = 90

		application = { 
			id = 5805
			name = "Semi-Modern Pressure Hull"
			desc = "Improvements in the design of pressure hulls meant that the newest generation of the submarine would be able to dive deeper.  These new pressure hulls had to be more hydrodynamic to support the higher speeds that are required by operations.  These pressure hulls are also more resistant to damage through more advanced metals and better welds.  These pressure hulls also have fewer penetrations which would weaken the hull."
			
			required = { 5606 5607 }
			chance = 90
			cost = 2
			time = 180
			neg_offset = 20
			pos_offset = 40
			
			effects = {
				command = { }
			}
		}
		application = { 
			id = 5806
			name = "Semi-Modern Submarine Diesel Engine"
			desc = "These are lightweight, powerful engines.  The extensive use of aluminum in the construction of the engine means that the weight is saved for other systems on the submarine.  These engines are also more powerful than their predecessors.  These diesel engines are also easier to maintain through more simple construction.  The cast aluminum parts are easy to manufacture which means that engine production can be dispersed into different manufacturing locations."
			
			required = { 5608 }
			chance = 90
			cost = 2
			time = 180
			neg_offset = 20
			pos_offset = 40
			
			effects = {
				command = { }
			}
		}
		application = { 
			id = 5807
			name = "Semi-Modern Battery System"
			desc = "Improvements in the storage batteries allowed for more efficient storage of energy for use by the electric motors which drive the submarine while submerged.  These batteries are sealed units which don't require maintenance by the crew to keep them operating.  This makes them more safe to operate and less prone to damage than their predecessors."
			
			required = { 5609 }
			chance = 90
			cost = 2
			time = 180
			neg_offset = 20
			pos_offset = 40
			
			effects = {
				command = { }
			}
		}
		application = { 
			id = 5808
			name = "Semi-Modern Battery Charging System"
			desc = "Improvements in power generation also meant that there were improvements in the equipment that is used for charging the batteries on submarines.  These chargers are able to charge the batteries more quickly than their predecessors.  The use of a trickle charger which adds a small amount of current to the batteries continuously keeps the batteries charged to full capacity."
			
			required = { 5610 }
			chance = 90
			cost = 2
			time = 180
			neg_offset = 20
			pos_offset = 40
			
			effects = {
				command = { }
			}
		}
		application = { 
			id = 5809
			name = "Semi-Modern Periscope"
			desc = "Improvements in optics meant that new periscopes were more precise than their predecessors.  Ranging with the periscope was done with a stadimeter which compared two images.  The waterline of the upper image was 'brought down' to the masthead of the lower image.  Using the height of the mast the range can be determined.  The accuracy of the optics will affect the accuracy of the range prediction.  These improved periscope optics allow for more accurate range estimations and better performance in low light situations."
			
			required = { 5611 }
			chance = 90
			cost = 2
			time = 180
			neg_offset = 20
			pos_offset = 40
			
			effects = {
				command = { }
			}
		}
		application = { 
			id = 5810
			name = "Basic Integrated Sonar/ASDIC Suite"
			desc = "Advances in hydrophones combined with advances in active sonar systems resulted in combined systems that are better than the individual parts.  These sonar systems are able to accurately track submerged targets and targets on the surface.  The hydrophones are able to accurately measure the bearing of the sound as well as signal strength which allows passive sonar tracking of targets."
			
			required = { 5612 }
			chance = 90
			cost = 3
			time = 180
			neg_offset = 20
			pos_offset = 40
			
			effects = {
				command = { type = surface_detection which = submarine when = on_upgrade value = 1 }
				command = { type = sub_detection which = submarine when = on_upgrade value = 1 }
				command = { type = sub_attack which = submarine when = on_upgrade value = 1 }
				command = { type = naval_defense which = submarine when = on_upgrade value = 1 }
			}
		}
		application = { 
			id = 5811
			name = "Internal Navigation System"
			desc = "With submarines operating underwater for longer periods of time, the need for a method of underwater navigation became apparent.  The internal navigation system uses sensors to record the path that the submarine has taken since submerging.  Three sensors measure the submarine's movement in the six axis of motion.  This information allows the navigator to determine the position of the submarine to a certain degree."
			
			required = { 5107 }
			chance = 90
			cost = 2
			time = 180
			neg_offset = 20
			pos_offset = 40
			
			effects = {
				command = { }
			}
		}
		application = { 
			id = 5812
			name = "Wire Guided Torpedo"
			desc = "The problem with torpedoes is that once they were fired no changes could be made.  With the inclusion of a control wire into the torpedo will allow simple commands to be sent to the torpedo and information to be sent from the torpedo back to the submarine.  A lightweight, extremely thin wire is connected to the submarine and spooled out as the torpedo runs toward the target.  This set-up allows the torpedo to run maneuvers which will help keep the location of the firing submarine more in doubt."
			
			required = { 5713 5810 }
			chance = 90
			cost = 3
			time = 180
			neg_offset = 20
			pos_offset = 40
			
			effects = {
				command = { type = naval_attack which = submarine value = 1 }
				command = { type = supply_consumption which = submarine value = 0.1 }
			}
		}
		application = { 
			id = 5813
			name = "Submarine Nuclear Reactor Experimentation"
			desc = "The use of nuclear power for submarines gives them large advantages over any conventionally powered submarine.  The main advantage is the ability to remain submerged without having to worry about providing air for diesel engines or fuel for alternative engines.  This will give the submarine nearly limitless range.  This will be a long process of design and experimentation."
			
			required = { 8971 13508 }
			chance = 90
			cost = 4
			time = 360
			neg_offset = 20
			pos_offset = 40
			
			effects = {
				command = { }
			}
		}
		application = { 
			id = 5814
			name = "Basic Closed-Cycle Long Range Submarine"
			desc = "The use of the liquid oxygen to provide air for the diesel allows the batteries to be recharged while the submarine is operating submerged.  This system works to supplement the snorkel when the boat is unable to raise the mast due to enemy attacks.  This increases the distance and speed that the submarine can use for evading attacking enemy forces.  By increasing both the distance and the speed, the area that the enemy forces have to search is increased exponentially.  This will result in the submarine surviving the encounter more frequently."
			
			required = { 5709 5710 5714 }
			chance = 90
			cost = 3
			time = 180
			neg_offset = 20
			pos_offset = 40
			
			effects = {
				command = { type = new_model which = submarine value = 18 }
			}
		}
		application = { 
			id = 5815
			name = "Basic Walter Engine Long Range Submarine"
			desc = "The use of the Walter Turbine gives the submarine the ability to make short sprints at high speeds to avoid enemy counterattacks.  Hydrogen-peroxide is broken down and combined with diesel to provide steam for the turbine.  The steam is highly corrosive and explosive so the system is hazardous to use.  The submarine is larger than a standard long range submarine to make room for the large hydrogen-peroxide tanks, but there is still less room for diesel fuel."
			
			required = { 5709 5711 5714 }
			chance = 90
			cost = 3
			time = 180
			neg_offset = 20
			pos_offset = 40
			
			effects = {
				command = { type = new_model which = submarine value = 19 }
			}
		}		

	} # Level 9
	
	level = { # 
		id = 5900
		name = "Semi-Modern Submarine Construction"
		desc = "These designs are the culmination of years of submarine development which stretch back to the late 1800's.  These submarines use technology which was undreamed of just years before.  They are a combination of lessons learned through combat and the evolution of submarine and naval design."
				
		cost = 8
		time = 270
		neg_offset = 45
		pos_offset = 90

		application = { 
			id = 5904
			name = "Improved Closed-Cycle Engine"
			desc = "Improvements to the concept of the closed-cycle engine allowed it to become more efficient.  It was observed that combining the oxygen with an inert gas like argon would improve the efficiency of the engine.  The argon is injected with the oxygen into the cylinder of the engine and then collected as exhaust on the other end of the reaction.  The collected argon is recycled so the amount of argon carried onboard is minimal."
			
			required = { 5710 }
			chance = 90
			cost = 2
			time = 180
			neg_offset = 20
			pos_offset = 40
			
			effects = {
				command = { }
			}
		}
		application = { 
			id = 5905
			name = "Improved Walter Turbine Engine"
			desc = "Improvements to the Walter Turbine allowed the engine to become more efficient.  The turbine works by breaking hydrogen-peroxide into its base components of hydrogen and oxygen which are very hot.  The oxygen is mixed with diesel fuel and ignited by the temperature of the oxygen.  The gas and hydrogen are run through the turbine in the same manner as a conventional steam turbine."
			
			required = { 5711 }
			chance = 90
			cost = 2
			time = 180
			neg_offset = 20
			pos_offset = 40
			
			effects = {
				command = { }
			}
		}
		application = { 
			id = 5906
			name = "Submarine Nuclear Reactor Deployment"
			desc = "The use of the nuclear reactor to power a submarine will increase the ability of the submarine to operate.  With the development of aircraft and increased sensor ability, it is dangerous for submarines to operate on the surface.  Even technologies like the Walter Turbine and the Closed-cycle engine need to put a snorkel above the water to get the most out of those systems.  The nuclear reactor will allow the submarine to remain submerged almost indefinitely because of its complete independence from air."
			
			required = { 5813 }
			chance = 90
			cost = 4
			time = 180
			neg_offset = 20
			pos_offset = 40
			
			effects = {
				command = { }
			}
		}
		application = { 
			id = 5907
			name = "Semi-Modern Short Range Submarine"
			desc = "All of the improvements in submarine technology have been leading towards this design.  This submarine combines all of the improvements in pressure hull, sensors, battery and diesel engine technologies.  These submarines are able to dive deeper and stay submerged longer than their predecessors.  This makes them very effective in attacking convoys or task forces.  Historically, this was the Japanese Sen(suikan) taka sho-class submarines and German Type XXV-class U-Boats."
			
			required = { 5613 5805 5806 5807 5808 5809 5811 }
			chance = 90
			cost = 3
			time = 180
			neg_offset = 20
			pos_offset = 40
			
			effects = {
				command = { type = new_model which = submarine value = 11 }
			}
		}
		application = { 
			id = 5908
			name = "Semi-Modern Medium Range Submarine"
			desc = "All of the improvements in submarine technology have been leading up to this generation of submarines.  This submarine includes all of the improvements that have been developed in pressure hulls, diesel engines, sensors, and batteries.  These submarines are able to dive deeper and stay submerged than their predecessors.  This makes them very capable while attacking convoys or enemy task forces.  Historically, this was the German Type XXI-class U-Boats."
			
			required = { 5614 5805 5806 5807 5808 5809 5811 }
			chance = 90
			cost = 3
			time = 180
			neg_offset = 20
			pos_offset = 40
			
			effects = {
				command = { type = new_model which = submarine value = 13 }
			}
		}
		application = { 
			id = 5909
			name = "Semi-Modern Long Range Submarine"
			desc = "The improvements in submarine technology have been aimed towards developing this generation of submarines.  This class of submarines includes all of the improvements that have been developed in pressure hulls, diesel engines, sensors and batteries.  These submarines are more capable than previous generations of long range submarines.  They are able to dive deeper and stay submerged longer than their predecessors.  This makes them very capable while attacking enemy convoys or task forces.  Historically, this was the US Guppy modified Gato-class and Soviet Foxtrot-class submarines."
			
			required = { 5714 5805 5806 5807 5808 5809 5811 }
			chance = 90
			cost = 3
			time = 180
			neg_offset = 20
			pos_offset = 40
			
			effects = {
				command = { type = new_model which = submarine value = 26 }
			}
		}

		
	} # Level 10
	
	level = {  
		id= 5941
		name = "Improved AIP Submarine Deployment"
		desc = "Improvements in Air Independent Propulsion systems allow better designs to be developed.  The heart of these new designs are better engines, but there are also improvements in the auxiliary systems which have been developed from war experience." 
				
		cost = 8
		time = 270
		neg_offset = 45
		pos_offset = 90
		
		application = { 
			id = 5910
			name = "Improved Closed-Cycle Short Range Submarine"
			desc = "Improvements in the closed-cycle process enabled improvements to be made in the original closed-cycle submarines.  Liquefied oxygen is carried onboard the submarine to provide air for the diesel engines while submerged.  This oxygen is mixed with an inert gas like argon which is recycled.  This makes the process more efficient.  These submarines are larger than standard short range submarines to provide room for the cylinders of oxygen.  Unfortunately, there is still less room for fuel within the hull giving them less range than standard short range submarines."
			
			required = { 5715 5904 }
			chance = 90
			cost = 3
			time = 180
			neg_offset = 20
			pos_offset = 40
			
			effects = {
				command = { type = new_model which = submarine value = 20 }
			}
		}
		application = { 
			id = 5911
			name = "Improved Closed-Cycle Medium Range Submarine"
			desc = "Improvements in the closed-cycle process enabled improvements to be made in the original closed-cycle designs.  Liquefied oxygen is carried onboard the submarine to provide air for the diesel engines while running submerged.  This oxygen is mixed with an inert gas like argon which is recycled to save space.  It also makes the process more efficient.  These submarines are larger than standard medium range submarines in order to provide space for the cylinders of oxygen.  Unfortunately, there is still less room for fuel within the hull giving them a shorter range than standard medium range submarines."
			
			required = { 5716 5904 }
			chance = 90
			cost = 3
			time = 180
			neg_offset = 20
			pos_offset = 40
			
			effects = {
				command = { type = new_model which = submarine value = 22 }
			}
		}
		application = { 
			id = 5912
			name = "Improved Closed-Cycle Long Range Submarine"
			desc = "Improvements in the closed-cycle process enabled improvements to be made in the original closed-cycle  designs.  Liquefied oxygen is carried onboard the submarine to provide air for the diesel engines while running submerged.  This oxygen is mixed with an inert gas like argon which is recycled to save space.  It also makes the combustion process more efficient.  These submarines are larger than standard long range submarines in order to provide space for the cylinders of oxygen.  Unfortunately, there is still less room for fuel within the hull giving them a shorter range than standard long range submarines."
			
			required = { 5814 5904 }
			chance = 90
			cost = 3
			time = 180
			neg_offset = 20
			pos_offset = 40
			
			effects = {
				command = { type = new_model which = submarine value = 24 }
			}
		}
		application = { 
			id = 5913
			name = "Improved Walter Engine Short Range Submarine"
			desc = "Improvements in the Walter turbine enabled the submarines equipped with the turbine to be more effective.  Hydrogen-peroxide is broken into hydrogen and oxygen and then combined with diesel to create a steam that is run through the turbine.  This allows the submarine to make bursts of submerged speed while attacking enemy convoys and task forces.  This allows them to evade counterattacks more effectively.  These submarines have less range than a standard short range submarine because of the hull space taken up by the hydrogen-peroxide tanks means that less diesel fuel is carried."
			
			required = { 5717 5905 }
			chance = 90
			cost = 3
			time = 180
			neg_offset = 20
			pos_offset = 40
			
			effects = {
				command = { type = new_model which = submarine value = 21 }
			}
		}
		application = { 
			id = 5914
			name = "Improved Walter Engine Medium Range Submarine"
			desc = "Improvements in the Walter turbine enabled the submarines equipped with the turbine to be more effective.  Hydrogen-peroxide is broken into hydrogen and oxygen then combined with diesel to create a steam that is run through the turbine.  This allows the submarine to make short bursts of submerged speed while attacking enemy convoys and task forces.  This allows them to evade counterattacks more effectively.  These submarines have less range than a standard medium range submarine because of the hull space taken up by the hydrogen-peroxide tanks means that less diesel fuel is carried."
			
			required = { 5718 5905 }
			chance = 90
			cost = 3
			time = 180
			neg_offset = 20
			pos_offset = 40
			
			effects = {
				command = { type = new_model which = submarine value = 23 }
			}
		}
		application = { 
			id = 5915
			name = "Improved Walter Engine Long Range Submarine"
			desc = "Improvements in the Walter turbine enabled the submarines equipped with the turbine to be more effective.  Hydrogen-peroxide is broken into hydrogen and oxygen then combined with diesel to create steam which is run through the turbine.  This allows the submarine to make short bursts of submerged speed while attacking enemy convoys and task forces.  This allows them to evade counterattacks more effectively.  These submarines have less range than a standard long range submarine because of the hull space that is taken up by the hydrogen-peroxide tanks means that less diesel fuel is carried."
			
			required = { 5815 5905 }
			chance = 90
			cost = 3
			time = 180
			neg_offset = 20
			pos_offset = 40
			
			effects = {
				command = { type = new_model which = submarine value = 25 }
			}
		}

	} # Level 11
	
	level = { 
		id = 5971
		name = "Nuclear Submarine Deployment" 
		desc = "When nuclear fission was first discovered, the navy was quick to see the potential as a propulsion system that wouldn't require air.  The reactor is used to heat water.  The superheated water is sent into a steam generator where the radioactive water is used to make non-radioactive steam.  The steam runs a conventional steam turbine to provide propulsion.  The water is pumped back into the reactor as coolant and the cycle restarts.  These are the first submarines built since before World War I that use a steam turbine for propulsion."
				
		cost = 8
		time = 270
		neg_offset = 45
		pos_offset = 90
		

		application = { 
			id = 5916
			name = "Basic Nuclear Powered Submarine"
			desc = "The development of the nuclear reactor means that a submarine can be built that is totally independent from outside air for propulsion.  The power plant consists of a water cooled nuclear reactor that is used to generate steam which is used for driving a standard steam turbine.  The nuclear reactor doesn't need air which means that the submarine is only limited by the endurance of the crew.  The only limitation to the submarine's range is the amount of food that can be carried onboard.  Historically, this was the US Nautilus-class and Soviet November-class nuclear submarines."
			
			required = { 5906 5909 }
			chance = 90
			cost = 4
			time = 180
			neg_offset = 20
			pos_offset = 40
			
			effects = {
				command = { type = new_model which = submarine value = 27 }
			}
		}

	} # Level 12

}